package com.shopping_back.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.shopping_back.pojo.dto.PageDTO;
import com.shopping_back.pojo.entity.UserAccount;
import com.baomidou.mybatisplus.extension.service.IService;

/**
 * <p>
 * 用户账户表 服务类
 * </p>
 *
 * @author Jack
 * @since 2025-07-12
 */
public interface IUserAccountService extends IService<UserAccount> {

    boolean register(UserAccount user, String emailCaptcha);

    void deleteAccount(Long id);

    void resetPassword(Long id, String password, String repassword);
    // 新增方法：根据用户名检查用户是否存在
    boolean existsByUsername(String username);

    // 新增方法：根据邮箱检查用户是否存在
    boolean existsByEmail(String email);

    PageDTO<UserAccount> listAll(Integer pageNum, Integer pageSize, Integer status, String keyword);
    void changeStatus(Long id, Boolean status);
}
